using System.Reflection;

namespace Lucene.Linq.Expressions
{
    internal class OrderByExpression : ProjectionExpression
    {
        internal OrderByExpression(ProjectionExpression projection, PropertyInfo orderProperty, bool isDescending)
            : base(projection.Source, projection.Projector)
        {
            OrderProperty = orderProperty;
            IsDescending = isDescending;
        }

        internal PropertyInfo OrderProperty { get; private set; }
        internal bool IsDescending { get; private set; }
    }

    internal class OrderThenByExpression : OrderByExpression
    {
        internal OrderThenByExpression(ProjectionExpression projection, PropertyInfo orderProperty, bool isDescending)
            : base(projection, orderProperty, isDescending)
        { }
    }
}